**Figures and Tables in article


*(descriptions and sources for all data can be found in the online appendix)


****Figure 1: Type of Civil War Termination as a Percent of Total, by Time Period
**use file "Figure1data.dta"*


graph bar settlement victory lowact, over(timeperiod) stack

clear

*Note: this data is based on a crosstab from the master dataset; see Table A1 in online appendix, below*


****Table 1: Terrorist Organizations and Civil War Termniation, 2002-13
**use file "FTOs_IS.dta"*

tab  State_FTOs Settlement_or_lowact, chi2 column

clear


****Figure 2: Number of Civil Wars with Mediation on an Annual Basis
**use file "Howard_and_Stark_IS_2017.dta"*

keep Med_yesno Year

collapse (sum) mediation=Med_yesno, by(Year)

twoway line mediation Year

clear


****Table 3: Time Period and Mediation Attempts
**use file "Howard_and_Stark_IS_2017.dta"*

tab Med_yesno Timeperiod, chi2 column

clear


****Figure 5: Democ* and Stabilization
**use file "UNSCwords.dta"*

twoway lowess democ year || lowess stabilization year


****Figure 6: Negotiat* and terror*
**use file "UNSCwords.dta"*

twoway lowess negotiat year || lowess terror year

clear



*****************************************************************




**Figures and Tables in online appendix

****Figure A1: Number of Victories and Negotiated Settlements Annually
*use file "Howard_and_Stark_IS_2017.dta"*

gen TerminationOutcome1=0

replace TerminationOutcome1=1 if TerminationOutcome==1

replace TerminationOutcome1=1 if TerminationOutcome==2

replace TerminationOutcome1=2 if TerminationOutcome==3

replace TerminationOutcome1=2 if TerminationOutcome==4

replace TerminationOutcome1=3 if TerminationOutcome==5

keep Year TerminationOutcome1

gen negotiated=0

replace negotiated=1 if TerminationOutcome1==1

gen victory=0

replace victory=1 if TerminationOutcome1==2

gen lowact=0

replace lowact=1 if TerminationOutcome1==3

drop TerminationOutcome1

collapse (sum) Victory=victory Negotiated=negotiated Lowact=lowact, by(Year)

graph bar Victory Negotiated, over(Year) stack

clear


****Table A1: How Civil Wars End
*use file "Howard_and_Stark_IS_2017.dta"*

gen TerminationOutcome1=0

replace TerminationOutcome1=1 if TerminationOutcome==1

replace TerminationOutcome1=1 if TerminationOutcome==2

replace TerminationOutcome1=2 if TerminationOutcome==3

replace TerminationOutcome1=2 if TerminationOutcome==4

replace TerminationOutcome1=3 if TerminationOutcome==5

drop if TerminationOutcome1==0

tab TerminationOutcome1 Timeperiod, chi2 column

clear


****Figure A2:Percent of Ongoing Civil Wars that Ended and Did not End, by Civil War-Year
*use file "FigureA2_data.dta";

graph bar didnotend ended, over(timeperiod) stack

clear

*Note: this data is based on a crosstab from the master dataset*



****Table A2: Summary Statistics
*use file "Howard_and_Stark_IS_2017.dta"*

summarize Med_yesno SideAintervention SideBintervention UNPKO rebstrength1 conflicttype1 CumulativeIntensity Incompatibility Duration Duration2 Duration3



****Table A3: Time Period Predicts Medation Attempts
*use file "Howard_and_Stark_IS_2017.dta"*

logit   Med_yesno i.b2.Timeperiod SideAintervention SideBintervention UNPKO rebstrength1 conflicttype1 CumulativeIntensity Incompatibility Duration Duration2 Duration3 ConflictId1

logit   Med_yesno i.b2.Timeperiod SideAintervention SideBintervention UNPKO rebstrength1 conflicttype1 CumulativeIntensity Incompatibility Duration Duration2 Duration3
 
logit   Med_yesno i.b2.Timeperiod SideAintervention SideBintervention UNPKO rebstrength1 conflicttype1 CumulativeIntensity Incompatibility Duration Duration2 Duration3, cluster(ConflictId1)
  
xtset ConflictId1
  
xtlogit   Med_yesno i.b2.Timeperiod SideAintervention SideBintervention UNPKO rebstrength1 conflicttype1 CumulativeIntensity Incompatibility Duration Duration2 Duration3, fe
 
jackknife:  logit   Med_yesno i.b2.Timeperiod SideAintervention SideBintervention UNPKO rebstrength1 conflicttype1 CumulativeIntensity Incompatibility Duration Duration2 Duration3 ConflictId1

 clear
  
  
  
****Figure A3: Total number of ongoing civil wars and civil wars that experienced a mediation attempt on an annual basis
*use file "med_ongoing.dta"*

twoway line med Year || line total Year

*Note: this data is a collapsed version of the master dataset; see Figure 2*

